package com.surveycomp.servlets;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

public abstract class BaseServlet extends HttpServlet {
	private static final long serialVersionUID = -9220404004842059396L;

	protected static long getLong(String s, HttpServletRequest req) {
		long returnLong = 0;
		try {
			returnLong = Long.parseLong(req.getParameter(s));
		} catch (Exception e) {
		}
		return returnLong;
	}

	protected static int getInt(String s, HttpServletRequest req) {
		int returnInt = 0;
		try {
			returnInt = Integer.parseInt(req.getParameter(s));
		} catch (Exception e) {
			e.printStackTrace();
		}
		return returnInt;
	}
}
